package com.java0106;

import java.util.Random;
import java.util.stream.IntStream;

public class Test02 {
    public static void main(String[] args) {
        //Random 随机数
        Random r = new Random();
        boolean b = r.nextBoolean();
        System.out.println(b);

        int i = r.nextInt(100);//0-99
        System.out.println(i);

        int i1 = r.nextInt();
        System.out.println(i1);

        Random random = new Random();
        for(int a=0;a<10;a++){
            System.out.println(random.nextInt(10));//0-9
        }

        Random random1 = new Random();
        for(int m=0;m<10;m++){
            System.out.println(random.nextInt(20));
        }

        Random random2 = new Random();
        for(int n=0;n<10;n++){
            System.out.println(random.nextInt(30));
        }


    }
}
